---
layout: page
title: Posts
---

<ul>
<%- if options["templates"] == "liquid" -%>
  {% for post in collections.posts.resources %}
    <li>
      <a href="{{ post.relative_url }}">{{ post.data.title }}</a>
    </li>
  {% endfor %}
<%- elsif options["templates"] == "serbea" -%>
  {% collections.posts.each do |post| %}
    <li>
      <a href="{{ post.relative_url }}">{{ post.data.title }}</a>
    </li>
  {% end %}
<%- else -%>
  <%% collections.posts.each do |post| %>
    <li>
      <a href="<%%= post.relative_url %>"><%%= post.data.title %></a>
    </li>
  <%% end %>
<%- end -%>
</ul>

If you have a lot of posts, you may want to consider adding [pagination](https://www.bridgetownrb.com/docs/content/pagination)!
